/**
 * 
 */
package com.lanswon.controller;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lanswon.common.util.StringUtil;
import com.lanswon.service.AdminService;
import com.mysql.fabric.Response;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

/**
 * @author lanswon
 *
 */
@Controller
@RequestMapping("/front")
public class AdminController {
	@Autowired
	AdminService adminService;

	@RequestMapping("/loginCheck")
	@ResponseBody
	public Map<String, Object> loginCheck(HttpServletRequest request, String identifier, String credential,
			HttpServletResponse response)  {
		return adminService.login(identifier, credential, request);

	}
	
	@RequestMapping("/withdraw")
	@ResponseBody
	public Map<String, Object> withdraw(HttpServletRequest request) {
		return adminService.withdraw(request);

	}

	@RequestMapping("/login.do")
	public String login() {
		return "front/qzsmk";
	}

}
